<header class="masthead">
  {% if site.avatar -%}
    <div class="avatar">
      {%- if site.avatar contains "://" -%}
        {%- assign avatar = site.avatar -%}
      {%- else -%}
        {%- assign avatar = site.avatar | relative_url -%}
      {%- endif -%}
      <img src="{{ avatar }}" class="avatar-image" alt="{{ site.author.name }}">
    </div>
  {%- endif %}
  <div class="masthead-title">
    <a href="{{ "/" | relative_url }}" title="Home">{{ site.title }}</a>
  </div>
  <div class="masthead-tagline">
    <small>{{ site.description }}</small>
  </div>
  {%- if site.data.navigation -%}
  <nav class="navigation">
    <ul class="navigation-list">
    {%- for nav in site.data.navigation -%}
      <li class="navigation-item">
        <a onclick="sessionStorage.setItem('forceCheckScroll', 'true')" href="{{ nav.url | relative_url }}">{{ nav.title | escape }}</a>
      </li>
    {%- endfor -%}
    </ul>
  </nav>
  {%- endif -%}
  {% if site.data.social -%}
    <div class="social pure-menu pure-menu-horizontal">
      <ul class="social-icons pure-menu-list">
      {% for social in site.data.social -%}
        <li class="pure-menu-item">
          <a class="social-icon pure-menu-link" href="{{ social.url }}">
            <i class="{{ social.icon | default: 'fas fa-link' }}" title="{{ social.title }}"></i>
          </a>
        </li>
      {%- endfor %}
      </ul>
    </div>
  {%- endif %}
</header>
